package com.wchat.utils;

import com.wchat.vo.ResultVo;

/**
 * Created by yangtianrui on 17/8/11.
 */
public class ResultVoUtils {

    public static ResultVo success(Object object)
    {
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(0);
        resultVo.setMsg("成功");
        resultVo.setData(object);
        return resultVo;
    }


    public static ResultVo success()
    {
        return success(null);
    }

    public static ResultVo error(Integer code,String msg)
    {
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(code);
        resultVo.setMsg(msg);
        return resultVo;
    }

}
